/**
 * Copyright (C) 2013 SHANGHAI VOLKSWAGEN, All rights reserved.
 * License version 1.0, a copy of which has been included with this.
 *
 * @File name：com.bwie.community.singleton.SingletonTest
 * @Create on：2024/4/7
 * @Author：liuchang
 */
package com.bwie.community.singleton;

/**
 * <p>ClassName：SingletonTest</p >
 * <p>Description：</p >
 * <p>Author：liuchang</p >
 * <p>Date：2024/4/7</p >
 */
public class SingletonTest {

    public static void main(String[] args) {
//        Singleton instance = Singleton.getInstance();
//        Singleton instance1 = Singleton.getInstance();
//        System.out.println(instance==instance1);
//        System.out.println(instance.hashCode());
//        System.out.println(instance1.hashCode());


//        Singleton2 instance2 = Singleton2.getInstance();
//        Singleton2 instance3 = Singleton2.getInstance();
//        System.out.println(instance2==instance3);
//        System.out.println(instance2.hashCode());
//        System.out.println(instance3.hashCode());

        SingletonLazy instance = SingletonLazy.getInstance();
        SingletonLazy instance1 = SingletonLazy.getInstance();
        System.out.println(instance==instance1);
    }






}
